<?php

include_once 'common.php';

// $sql = "SELECT DISTINCT `title`, `office` FROM `trex_records` ORDER BY `title` DESC";
// $sql = "SELECT DISTINCT `title`,`office`,`year` FROM `trex_records` ORDER BY `title` DESC";
$sql = "SELECT DISTINCT `title` FROM `trex_records` ORDER BY `title` DESC";
$result = exec_sql($sql);
if ($result && gettype($result) == 'array' && count($result) > 0) {
  output($result);
} else {
  output([]);
}